/*
 * Created on Apr 17, 2004
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package org.vectrics.skill.struts;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.apache.log4j.Logger;
import org.vectrics.common.pagelist.PageList;
import org.vectrics.recruiter.RecruitServiceLocator;
import org.vectrics.user.Person;

/**
 * @author mmoore
 */
public class UserEvaluationPageList extends PageList {
	private static final Logger log = Logger.getLogger(UserEvaluationPageList.class);
	private Person person = null;

	/**
	 * 
	 */
	public UserEvaluationPageList(Person person) {
		super();
		this.person = person;
	}

	public int getTotalElementCount() {
		log.debug("getTotalElementCount() - called");
		int count = 0;
		Collection evalList = RecruitServiceLocator.getSkillProvider().findAllUserEvaluations(person);
		log.debug("getTotalElementCount() - finished getting list ");
		count = evalList.size();
		log.debug("getTotalElementCount() - count = " + count);
		return(count);
	}
	

	public List getElements(int start, int end) {
		log.debug("getElements() called");
		ArrayList evalList = new ArrayList();
		int count = 0;
		evalList.addAll(RecruitServiceLocator.getSkillProvider().findAllUserEvaluations(person));
		log.debug("getTotalElementCount() - finished getting list ");
		count = evalList.size();
		log.debug("getTotalElementCount() - count = " + count);
		return(evalList);
	}


	

}
